<template>
  <div class="home">
      <div>
        {{$store.state.msg}}
        <button @click="$store.commit('changeMsg','我是菜菜')">this is mutations</button>
      </div>
      <div>
        {{$store.state.age}}
        <button @click="$store.dispatch('changeAge','我是王煜')">this is actions</button>
      </div>
      <div>
        {{$store.state.number}}
        {{$store.getters.changeGetters}}
        <button @click="$store.commit('changeGettersFn',10)">+1</button>
      </div>
  </div>
</template>

<script>
// @ is an alias to /src

export default {
  name: 'Home',
  components: {
  },
  mounted() {
    console.log(this,'this')
  }
}
</script>
